Page({
  data: {
    explainIsok: false,
    popupShow: false
  },
  onLoad (option) {

  },
  Payment () {
    // 支付
    // wx.requestPayment({
    //   timeStamp: paymentData?.timeStamp,
    //   nonceStr: paymentData?.nonceStr,
    //   package: paymentData?.packageVal,
    //   paySign: paymentData?.paySign,
    //   signType: "RSA", // 该参数为固定值
    //   success(res) {
    //     // 支付成功回调，实现自定义的业务逻辑
    //     console.log('唤起支付组件成功：', res);
    //   },
    //   fail(err) {
    //     // 支付失败回调
    //     console.error('唤起支付组件失败：', err);
    //   }
    // });
  },
  openLocation () {
    // 打开地图查看位置
    let locationObj = {
      latitude: '',
      longitude: '',
      name: '',
      address: ''
    }
    wx.openLocation({
      ...locationObj,
      complete (res) {
        console.log(res, '查看信息呢')
      }
    })
  },
  showModal (e) {
    this.setData({ popupShow: true, popupCode: e.target.dataset.code })
  },
  onChangeRadio (e) {
    this.setData({ explainIsok: true })
  },
  onClose () {
    this.setData({ popupShow: false })
  },
  onSubmit () {
    let Order_date = wx.$util.formatYMD(new Date())
    let postData = {
      "table": {
        "table_id": "e_zuche_zuchedan",
        "entitys": [
          {
            "entity": {
              // "zhangtaohesuanquyu": 5,
              "Order_date": Order_date,
              // "hetongmingchen": 14,
              // "danjuleixingyinyong": 2,
              "dingdanzhuangtai": 1,
              "Order_client_ID": 12,
              // "kehudanweiquanchen": "佛山市金旅旅游集团有限公司",
              "kehudanweilianxiren": "小黑",
              "kehudanweilianxirenshouji": "13690147852",
              // "kehudizhi": "佛山市禅城区季华隧道与文华北路交叉路口往西南约200米",
              "yongcheriqi": "2024-07-17",
              "yongcheshijian": "2024-07-17 00:00:00",
              "zuchetianshu": "1.00",
              "jieshuriqi": "2024-07-17",
              "quchengqidian": "佛山市禅城区人民政府",
              "quchengtujingdian": "中山公园,佛山汽车站",
              "quchengqidi": "光明花半里",
              "huichengqidian": null,
              "huichengtujingdian": null,
              "huichengqidi": null,
              "xuanzerenwuleixing": 1, // 1是单程 2是双程
              "shifuyuquchengxiangtong": 0,
              "xuanzepaicheleixing": 1,// 1是单次排车 2是按日排车
              // "account_period": 202407,
              "xuanzejiesuanfangshi": 8,
              "beizhu": "你好我是测试租车单的信息2222",
              // "suoshupianqubianhao": 2,
              // "shangchedianlicheng": "6.000",
              // "quchengzonglicheng": "16.000",
              // "huichengzonglicheng": "0.000",
              // "julizonglicheng": "16.000",
              // "shouchedianlicheng": "9.000",
              // "yugujifeilicheng": "22.000",
              // "youhuilicheng": "0",
              // "zhixingjifeilicheng": "22.000",
              // "shifukaipiao": 0,
              // "fapiaotaitou": null,
              // "nashuirenshibiehao": null,
              // "kaihuyinxing": null,
              // "yinxingzhanghao": null,
              // "kaipiaobeizhu": "佛山市金旅旅游集团有限公司",
              // "shifubaohanluqiaofei": 0,
              // "shifubaohanjiayoufei": 0,
              // "shifubaohantingchefei": 0,
              // "shifubaohanzhusufei": 0,
              // "shifubaohancanfei": 0,
              // "shifubaohancanbu": 0,
              // "shifubaohankuangquanshuifei": 0,
              // "shifubaohanqitafei": 0,
              // "shuilv": "8",
              "row_id": "0",
              "renwuleixingbianhao": "0",
              "zuchefangshimingchen": "单程",
              "paicheleixingbianhao": "0",
              "paicheleixingmingchen": "单次排车",
              "jiesuanfangshimingchen": "全款",
              "jiesuanfangshibianhao": "0",
              "danjuleixingbianhao": "1",
              "danjuleixingmingchen": "班线租车单",
              "suoshupianqujingdu": "113.1108",
              "suoshupianqumingchen": "南海区",
              "suoshupianquweidu": "23.0415",
              "quchengqidiandizhi": "广东省佛山市禅城区岭南大道北80号",
              "quchengqidianweidu": 23.009366,
              "quchengqidianjingdu": 113.122506,
              "quchengqidianqubianhao": "440604",
              "quchengqidianshengmingchen": "广东省",
              "quchengqidianshimingchen": "佛山市",
              "quchengqidianqumingchen": "禅城区",
              "quchengqidianshengbianhao": null,
              "quchengqidianshibianhao": null,
              "quchengtujingdianjingweidu": "[{\"name\":\"中山公园\",\"longitude\":113.115791,\"latitude\":23.045332,\"address\":\"广东省佛山市禅城区河滨路12号\"},{\"name\":\"佛山汽车站\",\"longitude\":113.110821,\"latitude\":23.04145,\"address\":\"广东省佛山市禅城区汾江中路6号\"}]",
              "quchengqididizhi": "广东省佛山市南海区罗村大道南1号",
              "quchengqidiweidu": 23.047987,
              "quchengqidijingdu": 113.046946,
              "quchengqidiqubianhao": 440605,
              "quchengqidishengmingchen": "广东省",
              "quchengqidishimingchen": "佛山市",
              "quchengqidiqumingchen": "南海区",
              "quchengqidishengbianhao": null,
              "quchengqidishibianhao": null,
              "huichengtujingdianjingweidu": null,
              "huichengqidiandizhi": null,
              "huichengqidianweidu": null,
              "huichengqidianjingdu": null,
              "huichengqidianqubianhao": null,
              "huichengqidianshengmingchen": null,
              "huichengqidianshimingchen": null,
              "huichengqidianqumingchen": null,
              "huichengqidianshengbianhao": null,
              "huichengqidianshibianhao": null,
              "huichengqididizhi": null,
              "huichengqidiweidu": null,
              "huichengqidijingdu": null,
              "huichengqidiqubianhao": null,
              "huichengqidishengmingchen": null,
              "huichengqidishimingchen": null,
              "huichengqidiqumingchen": null,
              "huichengqidishengbianhao": null,
              "huichengqidishibianhao": null,
              // "hetongdanhao": "HT2023-05-28-000001",
              // "kehudanweibianhao": "YC0003",
              // "kehuleixingbianhao": "2",
              // "kehuleibiebianhao": "3",
              // "kehuhesuanquyu": "5",
              // "kehudianhua": null,
              // "kehuleibiemingchen": "普通客户",
              // "kehuleixingmingchen": "企业客户"
            },
            "details": []
          }
        ]
      }
    }
    wx.$post(3, 'DynamicUpdate/dynamic_update_v3', postData).then(res => {
      console.log(res, '查看一下呢')
    })
  }
})